<?php
namespace app\baseinfo\controller;

class Customers extends \app\common\controller\Base {
	protected $modelname='Customer';


	protected function _index(){
		$condition=[];
		$param=$this->param;

    if (isset($param['name']))
      $condition[]=['name','like',"%".$param['name']."%"];

    if (isset($param['role']))
      $condition[]=['role','like',"%".$param['role']."%"];

    if (isset($param['birth']))
      $condition[]=['birth','between',$param['birth']];

    if (isset($param['location']))
      $condition[]=['location','like',"%".$param['location']."%"];

    if (isset($param['total_point']))
      $condition[]=['total_point','between',$param['total_point']];

    if (isset($param['balance']))
      $condition[]=['balance','between',$param['balance']];

    if (isset($param['remark']))
      $condition[]=['remark','like',"%".$param['remark']."%"];

		return $condition;
	}
}

?>